<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        ul{
            width: 400px;
            height: 200px;
            text-align: center;
            border: 2px solid #eee;
            margin: 0 auto;
            margin-top: 100px;
        }
        li{
            list-style: none;
            display: inline-block;
            font-size: 36px;
            height: 40px;
        }
    </style>
</head>
<body>
    <!-- ★☆ -->
    <ul>
        <li>☆</li>
        <li>☆</li>
        <li>☆</li>
        <li>☆</li>
        <li>☆</li>
    </ul>
</body>
<script src="./js/jquery-3.6.0.min.js"></script>
<script>
    let ul = $("ul");
    ul.on("mouseover", 'li', function() {
        $(this).html("★").siblings().html("★");
        $(this).nextAll().each(function(){
            $(this).html("☆");
        })
    })
    ul.on("mouseleave", 'li', function() {
        $(this).html("☆").siblings().html("☆");
    })
</script>
</html>